<template>
  <div class="dashboard">
    <el-row :gutter="20">
      <el-col :span="6">
        <el-card shadow="hover">
          <template #header>
            <div class="card-header">
              <span>总商店数</span>
            </div>
          </template>
          <div class="card-content">
            <h2>{{ statistics.totalShops }}</h2>
          </div>
        </el-card>
      </el-col>
      
      <el-col :span="6">
        <el-card shadow="hover">
          <template #header>
            <div class="card-header">
              <span>营业中商店</span>
            </div>
          </template>
          <div class="card-content">
            <h2>{{ statistics.activeShops }}</h2>
          </div>
        </el-card>
      </el-col>
      
      <el-col :span="6">
        <el-card shadow="hover">
          <template #header>
            <div class="card-header">
              <span>今日订单数</span>
            </div>
          </template>
          <div class="card-content">
            <h2>{{ statistics.todayOrders }}</h2>
          </div>
        </el-card>
      </el-col>
      
      <el-col :span="6">
        <el-card shadow="hover">
          <template #header>
            <div class="card-header">
              <span>今日营业额</span>
            </div>
          </template>
          <div class="card-content">
            <h2>¥{{ statistics.todayRevenue }}</h2>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { reactive } from 'vue'

const statistics = reactive({
  totalShops: 25,
  activeShops: 20,
  todayOrders: 156,
  todayRevenue: '25,630'
})
</script>

<style scoped>
.dashboard {
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-content {
  text-align: center;
  padding: 20px 0;
}

.el-card {
  margin-bottom: 20px;
}
</style> 